统一编译参数

chengzhenyu 8 ans auparavant
Parent
Commettre
0a29844985
6 fichiers modifiés avec 25 ajouts et 17 suppressions
  1. 4 0
      .idea/modules.xml
  2. 4 4
      app/build.gradle
  3. 0 0
      app/src/main/java/ai/pai/lensman/App.java
  4. 4 4
      common/build.gradle
  5. 9 5
      gradle.properties
  6. 4 4
      views/build.gradle

+ 4 - 0
.idea/modules.xml

@@ -3,10 +3,14 @@
3 3
   <component name="ProjectModuleManager">
4 4
     <modules>
5 5
       <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
6
+      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
7
+      <module fileurl="file://$PROJECT_DIR$/common/common.iml" filepath="$PROJECT_DIR$/common/common.iml" />
6 8
       <module fileurl="file://$PROJECT_DIR$/common/common.iml" filepath="$PROJECT_DIR$/common/common.iml" />
7 9
       <module fileurl="file://$PROJECT_DIR$/lensman.iml" filepath="$PROJECT_DIR$/lensman.iml" />
10
+      <module fileurl="file://$PROJECT_DIR$/lensman.iml" filepath="$PROJECT_DIR$/lensman.iml" />
8 11
       <module fileurl="file://$PROJECT_DIR$/lensman_ssh.iml" filepath="$PROJECT_DIR$/lensman_ssh.iml" />
9 12
       <module fileurl="file://$PROJECT_DIR$/views/views.iml" filepath="$PROJECT_DIR$/views/views.iml" />
13
+      <module fileurl="file://$PROJECT_DIR$/views/views.iml" filepath="$PROJECT_DIR$/views/views.iml" />
10 14
     </modules>
11 15
   </component>
12 16
 </project>

+ 4 - 4
app/build.gradle

@@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
2 2
 apply plugin: 'android-apt'
3 3
 
4 4
 android {
5
-    compileSdkVersion 24
6
-    buildToolsVersion "25.0.2"
5
+    compileSdkVersion COMPILE_SDK_VERSION as int
6
+    buildToolsVersion BUILD_TOOLS_VERSION as String
7 7
 
8 8
     dexOptions {
9 9
         preDexLibraries false
@@ -18,8 +18,8 @@ android {
18 18
     
19 19
     defaultConfig {
20 20
         applicationId "ai.pai.lensman"
21
-        minSdkVersion 14
22
-        targetSdkVersion 21
21
+        minSdkVersion MIN_SDK_VERSION as int
22
+        targetSdkVersion TARGET_SDK_VERSION as int
23 23
         versionCode 1011
24 24
         versionName "1.0.11"
25 25
         buildConfigField "boolean", "isTestMode", "true"

app/src/main/java/ai/pai/lensman/app.java → app/src/main/java/ai/pai/lensman/App.java


+ 4 - 4
common/build.gradle

@@ -1,12 +1,12 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 24
5
-    buildToolsVersion "25.0.2"
4
+    compileSdkVersion COMPILE_SDK_VERSION as int
5
+    buildToolsVersion BUILD_TOOLS_VERSION as String
6 6
 
7 7
     defaultConfig {
8
-        minSdkVersion 14
9
-        targetSdkVersion 21
8
+        minSdkVersion MIN_SDK_VERSION as int
9
+        targetSdkVersion TARGET_SDK_VERSION as int
10 10
         versionCode 1
11 11
         versionName "1.0"
12 12
     }

+ 9 - 5
gradle.properties

@@ -10,9 +10,13 @@
10 10
 # Specifies the JVM arguments used for the daemon process.
11 11
 # The setting is particularly useful for tweaking memory settings.
12 12
 # Default value: -Xmx10248m -XX:MaxPermSize=256m
13
-org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
13
+org.gradle.daemon=true
14
+org.gradle.jvmargs=-Xmx5120M -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15
+org.gradle.parallel=true
16
+android.useDeprecatedNdk=true
17
+org.gradle.configureondemand=true
14 18
 
15
-# When configured, Gradle will run in incubating parallel mode.
16
-# This option should only be used with decoupled projects. More details, visit
17
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
-org.gradle.parallel=true
19
+COMPILE_SDK_VERSION=24
20
+BUILD_TOOLS_VERSION=25.0.2
21
+MIN_SDK_VERSION=15
22
+TARGET_SDK_VERSION=21

+ 4 - 4
views/build.gradle

@@ -1,12 +1,12 @@
1 1
 apply plugin: 'com.android.library'
2 2
 
3 3
 android {
4
-    compileSdkVersion 24
5
-    buildToolsVersion "25.0.2"
4
+    compileSdkVersion COMPILE_SDK_VERSION as int
5
+    buildToolsVersion BUILD_TOOLS_VERSION as String
6 6
 
7 7
     defaultConfig {
8
-        minSdkVersion 14
9
-        targetSdkVersion 21
8
+        minSdkVersion MIN_SDK_VERSION as int
9
+        targetSdkVersion TARGET_SDK_VERSION as int
10 10
         versionCode 1
11 11
         versionName "1.0"
12 12
     }